package com.tsy.server.system.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 重置密码请求参数
 */
@Data
@ApiModel(value = "重置密码请求参数", description = "用户重置密码时需要提交的信息")
public class ResetPasswordDTO {

    /**
     * 临时令牌
     */
    @ApiModelProperty(value = "临时令牌", required = true, notes = "临时令牌由验证邮箱接口返回")
    @NotBlank(message = "临时令牌不能为空")
    private String restPwdToken;

    /**
     * 新密码
     */
    @ApiModelProperty(value = "新密码", required = true, example = "123456", notes = "密码长度必须在6-20个字符之间")
    @NotBlank(message = "新密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20个字符之间")
    private String newPassword;

    /**
     * 确认新密码
     */
    @ApiModelProperty(value = "确认新密码", required = true, example = "123456", notes = "必须与新密码一致")
    @NotBlank(message = "确认密码不能为空")
    private String confirmNewPassword;
}